Methods and systems for predicting prescription directions using machine learning algorithm

ABSTRACT

Methods and systems for predicting drug directions of a prescription are described. In one embodiment, values of a plurality of required pharmacy elements of a corresponding prescription are received and pre-processed, the values are weighted, a machine learning model to be used by a plurality of machine learning algorithms in predicting drug directions of the prescription is created, and a plurality of drug directions of the prescription are predicted by executing the machine learning algorithms on the weighted values of the plurality of required pharmacy elements of the prescription.

FIELD

The present disclosure relates generally to the technical field ofmachine learning. In a specific example, the present disclosure mayrelate to predicting drug directions of a prescription.

BACKGROUND

Doctors commonly use inconsistent language when describing instructionsto a patient as to how to administer a prescription (i.e., prescriptiondirections, often abbreviated “Signa” or Sig.”). For example, directionsto inject forty milligrams of a drug under the patient's skin everyother week may be provided as one of the following variations: “INJECT40 MG UNDER THE SKIN EVERY OTHER WEEK,” “INJECT 40 MG UNDER THE SKINEVERY OTHER WEEK AS DIRECTED,” or “INJECT 40 MG UNDER THE SKIN EVERYOTHER WEEK (MAINTENANCE DOSE).” When the prescription is received by apharmacy, a pharmacy technician must manually review and interpret theinconsistent language of the prescription directions before enteringprescription data into a computer. This data entry process takes asignificant amount of time and leads to inefficiencies. As such, thereis a continuing need to remove these inefficiencies from a prescriptionfilling process. For example, the present invention seeks to mitigatethese inefficiencies by a computer predicting prescription drugdirections using machine learning algorithms and displaying predictionsto a pharmacy technician or automatically filling data values.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram of an example system including ahigh-volume pharmacy.

FIG. 2 is a functional block diagram of an example pharmacy fulfillmentdevice, which may be deployed within the system of FIG. 1.

FIG. 3 is a functional block diagram of an example order processingdevice, which may be deployed within the system of FIG. 1.

FIG. 4 is a block diagram of a flowchart illustrating methods forpredicting prescription drug directions using machine learningalgorithms, according to an example embodiment;

FIG. 5 is a block diagram of a flowchart illustrating methods fortransforming words in prescription drug directions to numbers forprocessing by machine learning algorithms, according to an exampleembodiment;

FIG. 6 is a block diagram of a flowchart illustrating methods foridentifying and creating a list of numeric features in transformedwords, according to an example embodiment;

FIG. 7 is a diagram of an artificial neural network for predictingprescription drug directions from required pharmacy element values anddirections in a prescription, according to an example embodiment;

FIG. 8 is a diagram of confidence values for predicted prescription drugdirections, according to an example embodiment.

DETAILED DESCRIPTION

FIG. 1 is a block diagram of an example implementation of a system 100for a high-volume pharmacy. While the system 100 is generally describedas being deployed in a high-volume pharmacy or a fulfillment center (forexample, a mail order pharmacy, a direct delivery pharmacy, etc.), thesystem 100 and/or components of the system 100 may otherwise be deployed(for example, in a lower-volume pharmacy, etc.). A high-volume pharmacymay be a pharmacy that is capable of filling at least some prescriptionsmechanically. The system 100 may include a benefit manager device 102and a pharmacy device 106 in communication with each other directlyand/or over a network 104. The system 100 may also include a storagedevice 110.

The benefit manager device 102 is a device operated by an entity that isat least partially responsible for creation and/or management of thepharmacy or drug benefit. While the entity operating the benefit managerdevice 102 is typically a pharmacy benefit manager (PBM), other entitiesmay operate the benefit manager device 102 on behalf of themselves orother entities (such as PBMs). For example, the benefit manager device102 may be operated by a health plan, a retail pharmacy chain, a drugwholesaler, a data analytics or other type of software-related company,etc. In some implementations, a PBM that provides the pharmacy benefitmay provide one or more additional benefits including a medical orhealth benefit, a dental benefit, a vision benefit, a wellness benefit,a radiology benefit, a pet care benefit, an insurance benefit, a longterm care benefit, a nursing home benefit, etc. The PBM may, in additionto its PBM operations, operate one or more pharmacies. The pharmaciesmay be retail pharmacies, mail order pharmacies, etc.

In some embodiments, the benefit manager device 102 can include aserver, supercomputer, or other computing device configured to implementartificial intelligence algorithms, such as Neural Network, RandomForest, K-Neighbor, Gaussian Naïve Bayes, or Stochastic Gradient Descent(“SGD”). In some embodiments, the benefit manager device 102 can includea group of computers, such as an artificial neural network configured toimplement artificial intelligence machine learning algorithms.

Some of the operations of the PBM that operates the benefit managerdevice 102 may include the following activities and processes. A member(or a person on behalf of the member) of a pharmacy benefit plan mayobtain a prescription drug at a retail pharmacy location (e.g., alocation of a physical store) from a pharmacist or a pharmacisttechnician. In an example embodiment, a doctor or an assistant on behalfof the doctor can upload a prescription to the PBM (e.g. by transmittinga facsimile communication over the network 104). A technician can enterinformation related to the prescription into the pharmacy device 106 orrequest the benefit manager device 102 or the pharmacy device 106 topredict some or all values of required pharmacy elements (RPEs) relatedto the prescription using one of multiple machine learning algorithms.The member may also obtain the prescription drug through mail order drugdelivery from a mail order pharmacy location, such as the system 100. Insome implementations, the member may obtain the prescription drugdirectly or indirectly through the use of a machine, such as a kiosk, avending unit, a mobile electronic device 108, or a different type ofmechanical device, electrical device, electronic communication device,and/or computing device. Such a machine may be filled with theprescription drug in prescription packaging, which may include multipleprescription components, by the system 100. The pharmacy benefit plan isadministered by or through the benefit manager device 102.

The member may have a copayment for the prescription drug that reflectsan amount of money that the member is responsible to pay the pharmacyfor the prescription drug. The money paid by the member to the pharmacymay come from, as examples, personal funds of the member, a healthsavings account (HSA) of the member or the member's family, a healthreimbursement arrangement (HRA) of the member or the member's family, ora flexible spending account (FSA) of the member or the member's family.In some instances, an employer of the member may directly or indirectlyfund or reimburse the member for the copayments.

The amount of the copayment required by the member may vary acrossdifferent pharmacy benefit plans having different plan sponsors orclients and/or for different prescription drugs. The member's copaymentmay be a flat copayment (in one example, $10), coinsurance (in oneexample, 10%), and/or a deductible (for example, responsibility for thefirst $500 of annual prescription drug expense, etc.) for certainprescription drugs, certain types and/or classes of prescription drugs,and/or all prescription drugs. The copayment may be stored in thestorage device 110 or determined by the benefit manager device 102.

In some instances, the member may not pay the copayment or may only paya portion of the copayment for the prescription drug. For example, if ausual and customary cost for a generic version of a prescription drug is$4, and the member's flat copayment is $20 for the prescription drug,the member may only need to pay $4 to receive the prescription drug. Inanother example involving a worker's compensation claim, no copaymentmay be due by the member for the prescription drug.

In addition, copayments may also vary based on different deliverychannels for the prescription drug. For example, the copayment forreceiving the prescription drug from a mail order pharmacy location maybe less than the copayment for receiving the prescription drug from aretail pharmacy location.

In conjunction with receiving a copayment (if any) from the member anddispensing the prescription drug to the member, the pharmacy submits aclaim to the PBM for the prescription drug. After receiving the claim,the PBM (such as by using the benefit manager device 102) may performcertain adjudication operations including verifying eligibility for themember, identifying/reviewing an applicable formulary for the member todetermine any appropriate copayment, coinsurance, and deductible for theprescription drug, and performing a drug utilization review (DUR) forthe member. Further, the PBM may provide a response to the pharmacy (forexample, the pharmacy system 100) following performance of at least someof the aforementioned operations.

As part of the adjudication, a plan sponsor (or the PBM on behalf of theplan sponsor) ultimately reimburses the pharmacy for filling theprescription drug when the prescription drug was successfullyadjudicated. The aforementioned adjudication operations generally occurbefore the copayment is received and the prescription drug is dispensed.However in some instances, these operations may occur simultaneously,substantially simultaneously, or in a different order. In addition, moreor fewer adjudication operations may be performed as at least part ofthe adjudication process.

The amount of reimbursement paid to the pharmacy by a plan sponsorand/or money paid by the member may be determined at least partiallybased on types of pharmacy networks in which the pharmacy is included.In some implementations, the amount may also be determined based onother factors. For example, if the member pays the pharmacy for theprescription drug without using the prescription or drug benefitprovided by the PBM, the amount of money paid by the member may behigher than when the member uses the prescription or drug benefit. Insome implementations, the amount of money received by the pharmacy fordispensing the prescription drug and for the prescription drug itselfmay be higher than when the member uses the prescription or drugbenefit. Some or all of the foregoing operations may be performed byexecuting instructions stored in the benefit manager device 102 and/oran additional device.

Examples of the network 104 include a Global System for MobileCommunications (GSM) network, a code division multiple access (CDMA)network, 3rd Generation Partnership Project (3GPP), an Internet Protocol(IP) network, a Wireless Application Protocol (WAP) network, or an IEEE802.11 standards network, as well as various combinations of the abovenetworks. The network 104 may include an optical network. The network104 may be a local area network or a global communication network, suchas the Internet. In some implementations, the network 104 may include anetwork dedicated to prescription orders: a prescribing network such asthe electronic prescribing network operated by Surescripts of Arlington,Va.

Moreover, although the system shows a single network 104, multiplenetworks can be used. The multiple networks may communicate in seriesand/or parallel with each other to link the devices 102-110.

The pharmacy device 106 may be a device associated with a retailpharmacy location (e.g., an exclusive pharmacy location, a grocery storewith a retail pharmacy, or a general sales store with a retail pharmacy)or other type of pharmacy location at which a member attempts to obtaina prescription. The pharmacy may use the pharmacy device 106 to submitthe claim to the PBM for adjudication.

Additionally, in some implementations, the pharmacy device 106 mayenable information exchange between the pharmacy and the PBM. Forexample, this may allow the sharing of member information such as drughistory that may allow the pharmacy to better service a member (forexample, by providing more informed therapy consultation and druginteraction information). In some implementations, the benefit managerdevice 102 may track prescription drug fulfillment and/or otherinformation for users that are not members, or have not identifiedthemselves as members, at the time (or in conjunction with the time) inwhich they seek to have a prescription filled at a pharmacy.

The pharmacy device 106 may include a pharmacy fulfillment device 112,an order processing device 114, and a pharmacy management device 116 incommunication with each other directly and/or over the network 104. Theorder processing device 114 may receive information regarding fillingprescriptions and may direct an order component to one or more devicesof the pharmacy fulfillment device 112 at a pharmacy. The pharmacyfulfillment device 112 may fulfill, dispense, aggregate, and/or pack theorder components of the prescription drugs in accordance with one ormore prescription orders directed by the order processing device 114.

In general, the order processing device 114 is a device located withinor otherwise associated with the pharmacy to enable the pharmacyfulfilment device 112 to fulfill a prescription and dispenseprescription drugs. In some implementations, the order processing device114 may be an external order processing device separate from thepharmacy and in communication with other devices located within thepharmacy.

For example, the external order processing device may communicate withan internal pharmacy order processing device and/or other deviceslocated within the system 100. In some implementations, the externalorder processing device may have limited functionality (e.g., asoperated by a user requesting fulfillment of a prescription drug), whilethe internal pharmacy order processing device may have greaterfunctionality (e.g., as operated by a pharmacist).

The order processing device 114 may track the prescription order as itis fulfilled by the pharmacy fulfillment device 112. The prescriptionorder may include one or more prescription drugs to be filled by thepharmacy. The order processing device 114 may make pharmacy routingdecisions and/or order consolidation decisions for the particularprescription order. The pharmacy routing decisions include whatdevice(s) in the pharmacy are responsible for filling or otherwisehandling certain portions of the prescription order. The orderconsolidation decisions include whether portions of one prescriptionorder or multiple prescription orders should be shipped together for auser or a user family. The order processing device 114 may also trackand/or schedule literature or paperwork associated with eachprescription order or multiple prescription orders that are beingshipped together. In some implementations, the order processing device114 may operate in combination with the pharmacy management device 116.

The order processing device 114 may include circuitry, a processor, amemory to store data and instructions, and communication functionality.The order processing device 114 is dedicated to performing processes,methods, and/or instructions described in this application. Other typesof electronic devices may also be used that are specifically configuredto implement the processes, methods, and/or instructions described infurther detail below.

In some embodiments, the order processing device 114 can include aserver, supercomputer, or other computing device configured to implementartificial intelligence algorithms, such as Neural Network, RandomForest, K-Neighbor, Gaussian Naïve Bayes, or Stochastic Gradient Descent(“SGD”). In some embodiments, the order processing device 114 caninclude a group of computers, such as an artificial neural networkconfigured to implement artificial intelligence machine learningalgorithms.

In some implementations, at least some functionality of the orderprocessing device 114 may be included in the pharmacy management device116. The order processing device 114 may be in a client-serverrelationship with the pharmacy management device 116, in a peer-to-peerrelationship with the pharmacy management device 116, or in a differenttype of relationship with the pharmacy management device 116. The orderprocessing device 114 and/or the pharmacy management device 116 maycommunicate directly (for example, such as by using a local storage)and/or through the network 104 (such as by using a cloud storageconfiguration, software as a service, etc.) with the storage device 110.

The storage device 110 may include: non-transitory storage (for example,memory, hard disk, CD-ROM, etc.) in communication with the benefitmanager device 102 and/or the pharmacy device 106 directly and/or overthe network 104. The non-transitory storage may store order data 118,member data 120, claims data 122, drug data 124, prescription data 126,plan sponsor data 128, and/or machine learning algorithm data 130.Further, the system 100 may include additional devices, which maycommunicate with each other directly or over the network 104.

The order data 118 may be related to a prescription order. The orderdata may include type of the prescription drug (for example, drug nameand strength) and quantity of the prescription drug. The order data 118may also include data used for completion of the prescription, such asprescription materials. In general, prescription materials include anelectronic copy of information regarding the prescription drug forinclusion with or otherwise in conjunction with the fulfilledprescription. The prescription materials may include electronicinformation regarding drug interaction warnings, recommended usage,possible side effects, expiration date, date of prescribing, etc. Theorder data 118 may be used by a high-volume fulfillment center tofulfill a pharmacy order.

In some implementations, the order data 118 includes verificationinformation associated with fulfillment of the prescription in thepharmacy. For example, the order data 118 may include videos and/orimages taken of (i) the prescription drug prior to dispensing, duringdispensing, and/or after dispensing, (ii) the prescription container(for example, a prescription container and sealing lid, prescriptionpackaging, etc.) used to contain the prescription drug prior todispensing, during dispensing, and/or after dispensing, (iii) thepackaging and/or packaging materials used to ship or otherwise deliverthe prescription drug prior to dispensing, during dispensing, and/orafter dispensing, and/or (iv) the fulfillment process within thepharmacy. Other types of verification information such as barcode dataread from pallets, bins, trays, or carts used to transport prescriptionswithin the pharmacy may also be stored as order data 118.

The member data 120 includes information regarding the membersassociated with the PBM. The information stored as member data 120 mayinclude personal information, personal health information, protectedhealth information, etc. Examples of the member data 120 include name,address, telephone number, e-mail address, prescription drug history,etc. The member data 120 may include a plan sponsor identifier thatidentifies the plan sponsor associated with the member and/or a memberidentifier that identifies the member to the plan sponsor. The memberdata 120 may include a member identifier that identifies the plansponsor associated with the user and/or a user identifier thatidentifies the user to the plan sponsor. The member data 120 may alsoinclude dispensation preferences such as type of label, type of cap,message preferences, language preferences, etc.

The member data 120 may be accessed by various devices in the pharmacy(for example, the high-volume fulfillment center, etc.) to obtaininformation used for fulfillment and shipping of prescription orders. Insome implementations, an external order processing device operated by oron behalf of a member may have access to at least a portion of themember data 120 for review, verification, or other purposes.

In some implementations, the member data 120 may include information forpersons who are users of the pharmacy but are not members in thepharmacy benefit plan being provided by the PBM. For example, theseusers may obtain drugs directly from the pharmacy, through a privatelabel service offered by the pharmacy, the high-volume fulfillmentcenter, or otherwise. In general, the use of the terms “member” and“user” may be used interchangeably.

The claims data 122 includes information regarding pharmacy claimsadjudicated by the PBM under a drug benefit program provided by the PBMfor one or more plan sponsors. In general, the claims data 122 includesan identification of the client that sponsors the drug benefit programunder which the claim is made, and/or the member that purchased theprescription drug giving rise to the claim, the prescription drug thatwas filled by the pharmacy (e.g., the national drug code number, etc.),the dispensing date, generic indicator, generic product identifier (GPI)number, medication class, the cost of the prescription drug providedunder the drug benefit program, the copayment/coinsurance amount, rebateinformation, and/or member eligibility, etc. Additional information maybe included.

In some implementations, other types of claims beyond prescription drugclaims may be stored in the claims data 122. For example, medicalclaims, dental claims, wellness claims, or other types ofhealth-care-related claims for members may be stored as a portion of theclaims data 122.

In some implementations, the claims data 122 includes claims thatidentify the members with whom the claims are associated. Additionallyor alternatively, the claims data 122 may include claims that have beende-identified (that is, associated with a unique identifier but not witha particular, identifiable member).

The drug data 124 may include drug name (e.g., technical name and/orcommon name), other names by which the drug is known, activeingredients, an image of the drug (such as in pill form), etc. The drugdata 124 may include information associated with a single medication ormultiple medications.

The prescription data 126 may include information regardingprescriptions that may be issued by prescribers on behalf of users, whomay be members of the pharmacy benefit plan—for example, to be filled bya pharmacy. Examples of the prescription data 126 include user names,medication or treatment (such as lab tests), dosing information, etc.The prescriptions may include electronic prescriptions or paperprescriptions that have been scanned. In some implementations, thedosing information reflects a frequency of use (e.g., once a day, twicea day, before each meal, etc.) and a duration of use (e.g., a few days,a week, a few weeks, a month, etc.).

In some implementations, the order data 118 may be linked to associatedmember data 120, claims data 122, drug data 124, and/or prescriptiondata 126.

The plan sponsor data 128 includes information regarding the plansponsors of the PBM. Examples of the plan sponsor data 128 includecompany name, company address, contact name, contact telephone number,contact e-mail address, etc.

Furthermore, the machine learning algorithms data 130 can include codeor instructions necessary to implement each of multiple machine learningalgorithms. The code or instructions can be implemented by one or moreprocessors of the benefit manager device 102 or the pharmacy device 106(e.g., order processing device(s) 114, etc.). Each of the multiplemachine learning algorithms can make a prediction for a particularprescription (e.g. a prescription received via fax) based on one or morepredetermined factors (e.g. patient age, patient gender, prescribeddrug, patient medical conditions), a prediction process that can beperformed each time a faxed prescription is received. Each of themultiple machine learning algorithms can include code or instructions tolearn from a training dataset, as would be understood by one havingordinary skill in the art. Each of the multiple algorithms can change oradapt the code or instructions based on learning from the trainingdataset and make predictions according to the changed code orinstructions. According to an exemplary embodiment, the multiple machinelearning algorithms can include one or more neural network machinelearning algorithms. According to alternative exemplary embodiments, themultiple machine learning algorithms can include the Random Forestmachine learning algorithm, the K-Neighbor machine learning algorithm,the Gaussian Naïve Bayes machine learning algorithm, and the SGD machinelearning algorithm. In addition, each of the multiple machine learningalgorithms can generate confidence values when making a prediction.According to an exemplary embodiment, a confidence value can be astatistical value generated by running statistical analysis on thepredictions, and the confidence level can be used to gauge how likelythe predictions are to being accurate.

In some embodiments, each of the multiple machine learning algorithmscan make a prediction as to drug directions for taking or administeringthe prescription. By predicting the drug directions, each of the machinelearning algorithms can display the predicted directions and/orauto-populate values in a prescription form with the predicted values,thereby saving time for a pharmacist or a pharmacist technician infilling a prescription

Each of the multiple machine learning algorithms can make predictions asto drug directions for a prescription using predetermined factors, suchas patient age, patient gender, which drug has been prescribed, andmedical conditions. Different factors can be used to make drug directionpredictions, and the factors and number of factors used to make drugdirection predictions can depend on which predetermined factors bestlead to prediction accuracy. Each of the multiple machine learningalgorithms can learn and improve prediction success using a trainingdataset by factoring all or some of the predetermined factors listedabove. Furthermore, after learning from the training dataset, each ofthe multiple machine learning algorithms can make drug directionpredictions for a particular prescription based on all or some of thefactors.

FIG. 2 illustrates the pharmacy fulfillment device 112 according to anexample implementation. The pharmacy fulfillment device 112 may be usedto process and fulfill prescriptions and prescription orders. Afterfulfillment, the fulfilled prescriptions are packed for shipping.

The pharmacy fulfillment device 112 may include devices in communicationwith the benefit manager device 102, the order processing device 114,and/or the storage device 110, directly or over the network 104.Specifically, the pharmacy fulfillment device 112 may include palletsizing and pucking device(s) 206, loading device(s) 208, inspectdevice(s) 210, unit of use device(s) 212, automated dispensing device(s)214, manual fulfillment device(s) 216, review devices 218, imagingdevice(s) 220, cap device(s) 222, accumulation devices 224, packingdevice(s) 226, literature device(s) 228, unit of use packing device(s)230, and mail manifest device(s) 232. Further, the pharmacy fulfillmentdevice 112 may include additional devices, which may communicate witheach other directly or over the network 104.

In some implementations, operations performed by one of these devices206-232 may be performed sequentially, or in parallel with theoperations of another device as may be coordinated by the orderprocessing device 114. In some implementations, the order processingdevice 114 tracks a prescription with the pharmacy based on operationsperformed by one or more of the devices 206-232.

In some implementations, the pharmacy fulfillment device 112 maytransport prescription drug containers, for example, among the devices206-232 in the high-volume fulfillment center, by use of pallets. Thepallet sizing and pucking device 206 may configure pucks in a pallet. Apallet may be a transport structure for a number of prescriptioncontainers, and may include a number of cavities. A puck may be placedin one or more than one of the cavities in a pallet by the pallet sizingand pucking device 206. The puck may include a receptacle sized andshaped to receive a prescription container. Such containers may besupported by the pucks during carriage in the pallet. Different pucksmay have differently sized and shaped receptacles to accommodatecontainers of differing sizes, as may be appropriate for differentprescriptions.

The arrangement of pucks in a pallet may be determined by the orderprocessing device 114 based on prescriptions that the order processingdevice 114 decides to launch. The arrangement logic may be implementeddirectly in the pallet sizing and pucking device 206. Once aprescription is set to be launched, a puck suitable for the appropriatesize of container for that prescription may be positioned in a pallet bya robotic arm or pickers. The pallet sizing and pucking device 206 maylaunch a pallet once pucks have been configured in the pallet.

The loading device 208 may load prescription containers into the puckson a pallet by a robotic arm, a pick and place mechanism (also referredto as pickers), etc. In various implementations, the loading device 208has robotic arms or pickers to grasp a prescription container and moveit to and from a pallet or a puck. The loading device 208 may also printa label that is appropriate for a container that is to be loaded ontothe pallet, and apply the label to the container. The pallet may belocated on a conveyor assembly during these operations (e.g., at thehigh-volume fulfillment center, etc.).

The inspect device 210 may verify that containers in a pallet arecorrectly labeled and in the correct spot on the pallet. The inspectdevice 210 may scan the label on one or more containers on the pallet.Labels of containers may be scanned or imaged in full or in part by theinspect device 210. Such imaging may occur after the container has beenlifted out of its puck by a robotic arm, picker, etc., or may beotherwise scanned or imaged while retained in the puck. In someimplementations, images and/or video captured by the inspect device 210may be stored in the storage device 110 as order data 118.

The unit of use device 212 may temporarily store, monitor, label, and/ordispense unit of use products. In general, unit of use products areprescription drug products that may be delivered to a user or memberwithout being repackaged at the pharmacy. These products may includepills in a container, pills in a blister pack, inhalers, etc.Prescription drug products dispensed by the unit of use device 212 maybe packaged individually or collectively for shipping, or may be shippedin combination with other prescription drugs dispensed by other devicesin the high-volume fulfillment center.

At least some of the operations of the devices 206-232 may be directedby the order processing device 114. For example, the manual fulfillmentdevice 216, the review device 218, the automated dispensing device 214,and/or the packing device 226, etc. may receive instructions provided bythe order processing device 114.

The automated dispensing device 214 may include one or more devices thatdispense prescription drugs or pharmaceuticals into prescriptioncontainers in accordance with one or multiple prescription orders. Ingeneral, the automated dispensing device 214 may include mechanical andelectronic components with, in some implementations, software and/orlogic to facilitate pharmaceutical dispensing that would otherwise beperformed in a manual fashion by a pharmacist and/or pharmacisttechnician. For example, the automated dispensing device 214 may includehigh-volume fillers that fill a number of prescription drug types at arapid rate and blister pack machines that dispense and pack drugs into ablister pack. Prescription drugs dispensed by the automated dispensingdevices 214 may be packaged individually or collectively for shipping,or may be shipped in combination with other prescription drugs dispensedby other devices in the high-volume fulfillment center.

The manual fulfillment device 216 controls how prescriptions aremanually fulfilled. For example, the manual fulfillment device 216 mayreceive or obtain a container and enable fulfillment of the container bya pharmacist or pharmacy technician. In some implementations, the manualfulfillment device 216 provides the filled container to another devicein the pharmacy fulfillment devices 112 to be joined with othercontainers in a prescription order for a user or member.

In general, manual fulfillment may include operations at least partiallyperformed by a pharmacist or a pharmacy technician. For example, aperson may retrieve a supply of the prescribed drug, may make anobservation, may count out a prescribed quantity of drugs and place theminto a prescription container, etc. Some portions of the manualfulfillment process may be automated by use of a machine. For example,counting of capsules, tablets, or pills may be at least partiallyautomated (such as through use of a pill counter). Prescription drugsdispensed by the manual fulfillment device 216 may be packagedindividually or collectively for shipping, or may be shipped incombination with other prescription drugs dispensed by other devices inthe high-volume fulfillment center.

The review device 218 may process prescription containers to be reviewedby a pharmacist for proper pill count, exception handling, prescriptionverification, etc. Fulfilled prescriptions may be manually reviewedand/or verified by a pharmacist, as may be required by state or locallaw. A pharmacist or other licensed pharmacy person who may dispensecertain drugs in compliance with local and/or other laws may operate thereview device 218 and visually inspect a prescription container that hasbeen filled with a prescription drug. The pharmacist may review, verify,and/or evaluate drug quantity, drug strength, and/or drug interactionconcerns, or otherwise perform pharmacist services. The pharmacist mayalso handle containers which have been flagged as an exception, such ascontainers with unreadable labels, containers for which the associatedprescription order has been canceled, containers with defects, etc. Inan example, the manual review can be performed at a manual reviewstation.

The imaging device 220 may image containers once they have been filledwith pharmaceuticals. The imaging device 220 may measure a fill heightof the pharmaceuticals in the container based on the obtained image todetermine if the container is filled to the correct height given thetype of pharmaceutical and the number of pills in the prescription.Images of the pills in the container may also be obtained to detect thesize of the pills themselves and markings thereon. The images may betransmitted to the order processing device 114 and/or stored in thestorage device 110 as part of the order data 118.

The cap device 222 may be used to cap or otherwise seal a prescriptioncontainer. In some implementations, the cap device 222 may secure aprescription container with a type of cap in accordance with a userpreference (e.g., a preference regarding child resistance, etc.), a plansponsor preference, a prescriber preference, etc. The cap device 222 mayalso etch a message into the cap, although this process may be performedby a subsequent device in the high-volume fulfillment center.

The accumulation device 224 accumulates various containers ofprescription drugs in a prescription order. The accumulation device 224may accumulate prescription containers from various devices or areas ofthe pharmacy. For example, the accumulation device 224 may accumulateprescription containers from the unit of use device 212, the automateddispensing device 214, the manual fulfillment device 216, and the reviewdevice 218. The accumulation device 224 may be used to group theprescription containers prior to shipment to the member.

The literature device 228 prints, or otherwise generates, literature toinclude with each prescription drug order. The literature may be printedon multiple sheets of substrates, such as paper, coated paper, printablepolymers, or combinations of the above substrates. The literatureprinted by the literature device 228 may include information required toaccompany the prescription drugs included in a prescription order, otherinformation related to prescription drugs in the order, financialinformation associated with the order (for example, an invoice or anaccount statement), etc.

In some implementations, the literature device 228 folds or otherwiseprepares the literature for inclusion with a prescription drug order(e.g., in a shipping container). In other implementations, theliterature device 228 prints the literature and is separate from anotherdevice that prepares the printed literature for inclusion with aprescription order.

The packing device 226 packages the prescription order in preparationfor shipping the order. The packing device 226 may box, bag, orotherwise package the fulfilled prescription order for delivery. Thepacking device 226 may further place inserts (e.g., literature or otherpapers, etc.) into the packaging received from the literature device228. For example, bulk prescription orders may be shipped in a box,while other prescription orders may be shipped in a bag, which may be awrap seal bag.

The packing device 226 may label the box or bag with an address and arecipient's name. The label may be printed and affixed to the bag orbox, be printed directly onto the bag or box, or otherwise associatedwith the bag or box. The packing device 226 may sort the box or bag formailing in an efficient manner (e.g., sort by delivery address, etc.).The packing device 226 may include ice or temperature sensitive elementsfor prescriptions that are to be kept within a temperature range duringshipping (for example, this may be necessary in order to retainefficacy). The ultimate package may then be shipped through postal mail,through a mail order delivery service that ships via ground and/or air(e.g., UPS, FEDEX, or DHL, etc.), through a delivery service, through alocker box at a shipping site (e.g., AMAZON locker or a PO Box, etc.),or otherwise.

The unit of use packing device 230 packages a unit of use prescriptionorder in preparation for shipping the order. The unit of use packingdevice 230 may include manual scanning of containers to be bagged forshipping to verify each container in the order. In an exampleimplementation, the manual scanning may be performed at a manualscanning station. The pharmacy fulfillment device 112 may also include amail manifest device 232 to print mailing labels used by the packingdevice 226 and may print shipping manifests and packing lists.

While the pharmacy fulfillment device 112 in FIG. 2 is shown to includesingle devices 206-232, multiple devices may be used. When multipledevices are present, the multiple devices may be of the same device typeor models, or may be a different device type or model. The types ofdevices 206-232 shown in FIG. 2 are example devices. In otherconfigurations of the system 100, lesser, additional, or different typesof devices may be included.

Moreover, multiple devices may share processing and/or memory resources.The devices 206-232 may be located in the same area or in differentlocations. For example, the devices 206-232 may be located in a buildingor set of adjoining buildings. The devices 206-232 may be interconnected(such as by conveyors), networked, and/or otherwise in contact with oneanother or integrated with one another (e.g., at the high-volumefulfillment center, etc.). In addition, the functionality of a devicemay be split among a number of discrete devices and/or combined withother devices.

FIG. 3 illustrates the order processing device 114 according to anexample implementation. The order processing device 114 may be used byone or more operators to generate prescription orders, make routingdecisions, make prescription order consolidation decisions, trackliterature with the system 100, and/or view order status and other orderrelated information. For example, the prescription order may includeorder related components.

The order processing device 114 may receive instructions to fulfill anorder without operator intervention. An order component may include aprescription drug fulfilled by use of a container through the system100. The order processing device 114 may include an order verificationsubsystem 302, an order control subsystem 304, an order trackingsubsystem 306, and/or a drug direction prediction subsystem 308. Othersubsystems may also be included in the order processing device 114.

The order verification subsystem 302 may communicate with the benefitmanager device 102 to verify the eligibility of the member and reviewthe formulary to determine appropriate copayment, coinsurance, anddeductible for the prescription drug and/or perform a DUR (drugutilization review). Other communications between the order verificationsubsystem 302 and the benefit manager device 102 may be performed for avariety of purposes.

The order control subsystem 304 controls various movements of thecontainers and/or pallets along with various filling functions duringtheir progression through the system 100. In some implementations, theorder control subsystem 304 may identify the prescribed drug in one ormore than one prescription orders as capable of being fulfilled by theautomated dispensing device 214. The order control subsystem 304 maydetermine which prescriptions are to be launched and may determine thata pallet of automated-fill containers is to be launched.

The order control subsystem 304 may determine that an automated-fillprescription of a specific pharmaceutical is to be launched and mayexamine a queue of orders awaiting fulfillment for other prescriptionorders, which will be filled with the same pharmaceutical. The ordercontrol subsystem 304 may then launch orders with similar automated-fillpharmaceutical needs together in a pallet to the automated dispensingdevice 214. As the devices 206-232 may be interconnected by a system ofconveyors or other container movement systems, the order controlsubsystem 304 may control various conveyors: for example, to deliver thepallet from the loading device 208 to the manual fulfillment device 216from the literature device 228, paperwork as needed to fill theprescription.

The order tracking subsystem 306 may track a prescription order duringits progress toward fulfillment. The order tracking subsystem 306 maytrack, record, and/or update order history, order status, etc. The ordertracking subsystem 306 may store data locally (for example, in a memory)or as a portion of the order data 118 stored in the storage device 110.

According to an exemplary embodiment, the drug direction predictionsubsystem 308 can predict prescription drug directions from requiredpharmacy element values and directions in a prescription. The drugdirection prediction subsystem 308 can periodically train and update themachine learning algorithms. For example, every Sunday evening, the drugdirection prediction subsystem 308 can gather records involvingprescription claims; however, the drug direction prediction subsystem308 can perform data gathering other days or times (e.g. once a month onthe first of the month, once a day at midnight, etc.).

After gathering the records, the drug direction prediction subsystem 308can select a first of the multiple machine learning algorithms and trainthe first of the multiple machine learning algorithms using apredetermined percentage of the gathered records (e.g. 80% of therecords). According to an exemplary embodiment, training the first ofthe multiple machine learning algorithms can include the first of themultiple machine learning algorithms analyzing each record to determinethe known RPE values and a relationship between the known RPE values anddrug directions. However, training the first of the multiple machinelearning algorithms can include additional processes.

After training, the drug direction prediction subsystem 308 canimplement the first of the multiple machine learning algorithms, astrained, on the remainder of the gathered records (e.g. the remaining20% of the records) to determine a success rate of the first of themultiple machine learning algorithms at predicting drug directions forthe remainder of the gathered records. The success rate can be apercentage value indicating how often the first of the multiple machinelearning algorithms correctly predicted drug directions for anindividual prescription of the remainder of the gathered records.

The drug direction prediction subsystem 308 can repeat the processdescribed above using a second of the multiple machine learningalgorithms, namely the drug direction prediction subsystem 308 can trainthe second of the multiple machine learning algorithms using thepredetermined percentage of the gathered records, the drug directionprediction subsystem 308 can implement the second of the multiplemachine learning algorithms to predict drug directions on the remainderof the gathered records, and the drug direction prediction subsystem 308can determine the success rate of the second of the multiple machinelearning algorithms. This process repeats until the drug directionprediction subsystem 308 determines the success rate for each of themultiple machine learning algorithms. Finally, the machine learningalgorithm having the highest success rate is chosen and utilized by thedrug direction prediction subsystem 308.

In some embodiments, the drug direction prediction subsystem 308 canonly make predictions when a confidence value is above a threshold (e.g.80%, 90%, etc.). In addition, the drug direction prediction subsystem308 may only auto-populate predictions having a confidence value overthe threshold. Furthermore, predictions having a confidence value belowthe threshold can be excluded in calculating the success rate, or aprediction having a confidence level below the threshold can be countedas a failure in calculating the success rate.

The process of selecting a machine learning algorithm can repeatperiodically (e.g. once a week) using the original dataset and any newdata generated between a first iteration of the machine learningalgorithms selection process and a second iteration of the machinelearning algorithm selection process. For example, the first iterationmay use three years of prescription data, and the second iteration mayuse three years and one week of prescription data, if the machinelearning selection process is performed weekly.

FIG. 4 illustrates a method 400 for predicting prescription drugdirections using machine learning algorithms and displaying predictionsto a pharmacy technician or automatically filling data values accordingto an example embodiment. The method 400 may be performed by the orderprocessing device 114, partially by the order processing device 114 andpartially by another device of the system 100, or may be otherwiseperformed. For the sake of simplicity, the order processing device 114will be described as performing the steps of the method 400, but theembodiments described herein are not so limited.

According to an exemplary embodiment, the order processing device 114can read patient prescription data in step 402. In some embodiments, thepatient prescription data read in step 402 can include patientprescription data associated with one or more prescriptions receivedthrough facsimile, entered into a computer, and stored in a database. Insome embodiment, the order processing device 114 can receive patientprescription data from the database.

Subsequently, for each prescription having associated patientprescription data stored in the database, the order processing device114 can clean the patient prescription data in step 404. In someembodiments, the order processing device 114 can clean the data usingk-means clustering and a custom dictionary. For example, the customdictionary may standardize elements of the patient directions (e.g.,fourteen days is equivalent to two weeks, etc.). Building and using thecustom dictionary is described in greater detail below with regard toFIG. 5. As a result of step 404, the order processing device 114 canoutput a cleaned set of data used for future processing.

In step 406, for each prescription having associated patientprescription data stored in the database, the order processing device114 can tokenize the directions associated with a respectiveprescription by splitting the directions into a predetermined number ofwords (e.g., N words). A token is an instance of a sequence ofcharacters in the directions that are grouped together as a usefulsemantic for processing. In some embodiments, the tokenizing processgroups characters together to determine words. In some embodiments, theorder processing device 114 tokenizes the directions by distinguishingbetween the words of the directions based on whitespace betweencharacters, abbreviations, and/or sentence breaks. Starting with thefirst character in the directions, the order processing device 114 canmove along the characters in the directions and group them togetheruntil encountering a whitespace. Upon encountering the whitespace, theorder processing device 114 sets the grouped characters as the firsttoken (i.e., the first word) and then repeats the process until thepredetermined number of words is reached. In some embodiments, thepredetermined number of words can be thirty, and the order processingdevice 114 can split the directions into thirty words.

In step 408, for each prescription having associated patientprescription data stored in the database, the order processing device114 can transform the words or tokens into numbers as part of a textvectorization process. For example, the order processing device 114 canmake a dictionary (e.g., a vocabulary list) of unique words in thedirections and then represent each sentence of the directions as a realvalued vector with each word represented as 1 for present and 0 forabsent from the dictionary (e.g., a “Bag of Words” approach). In someembodiments, the order processing device 114 can represent the words asa count of the number of times each word appears in the directions(e.g., a term frequency approach).

In step 410, the order processing device 114 can identify and create alist of numeric features based on transforming the words or tokens intothe numbers as part of the text vectorization process. Step 410 isdescribed in more detail below with reference to FIG. 6. In someembodiments, steps 404 through 410 can be referred to as pre-processingthe patient prescription data. Furthermore, steps 404-410 can repeat foreach prescription having associated patient prescription data stored thedatabase. Alternatively, the order processing device 114 can performsteps 404-410 on a subset of the prescriptions having patientprescription data stored in the database (e.g. 80% of theprescriptions).

In step 412, the order processing device 114 can build an artificialneural network model based on historical data and based on thepre-processing of the patient prescription data in steps 402-410. Anexample artificial neural network model is described in more detailbelow with reference to FIG. 7.

In step 414, the order processing device 114 can receive a newprescription and can make a prediction regarding prescription drugdirections included within the new prescription using machine learningalgorithms. In addition, the order processing device 114 can test thepredictions for precision and accuracy.

In step 416, the order processing device 114 can display the predictedprescription drug directions to a user, who may be a pharmacist orpharmacist technician, for example. In some embodiments, the predictedprescription drug directions can be displayed on a graphical userinterface on a computer. In step 418, the order processing device 114can populate predicted prescription drug directions in a prescriptionform based on user selections of the displayed predicted prescriptiondrug directions, thereby saving time for a pharmacist or pharmacisttechnician in filling a prescription.

Alternatively, in step 420, the order processing device 114 canauto-populate predicted prescription drug directions in the prescriptionform, thereby saving time for a pharmacist or pharmacist technician infilling a prescription.

FIG. 5 illustrates a method for transforming words into numbersaccording to an example embodiment. In an embodiment, the illustratedmethod for transforming words into numbers forms, at least in part, step408 of the method 400.

In step 502, the order processing device 114 can create a dictionary ofthe words and a frequency of each word in each position. For example, adictionary of the words and frequencies may review, for example, 1033distinct prescriptions, and as a result, the dictionary of the words andfrequencies may include data indicating that a first word in thedirections is “Inject” at a frequency of 573 prescriptions out of the1033 prescriptions, that the first word in the directions is “Take” at afrequency of 337 prescriptions out of the 1033 prescriptions, and thatthe first word in the directions is “Use” at a frequency of 123prescriptions out of the 1033 prescriptions. The dictionary can includewords and frequencies for each subsequent word in the directions as well(e.g. the second word in the directions, the third word in thedirections . . . the thirtieth word in the directions). The dictionarycan also include data indicative of the words and frequencies up to thepredetermined number (N) of the words in the directions.

In step 504, the order processing device 114 can assign a ranking thatorders the frequencies. For example, ranking the frequencies may include“Inject=1, Take=2, Use=3” to indicate that “Inject” is the most frequentfirst word of the directions, “Take” is the second-most frequent firstword of the directions, and “Use” is the third-most frequent first wordof the directions.

FIG. 6 illustrates a method for identifying and creating a list ofnumeric features according to an example embodiment. In an embodiment,the illustrated method for identifying and creating a list of numericfeatures forms, at least in part, step 410 of the method 400.

In step 602, the order processing device 114 can determine that thetraining set contains a skewed sample by the distribution of theY-values. In some embodiments, the order processing device 114 candetermine the training set is skewed if one tail of the distribution islonger than the other (i.e., an asymmetrical distribution). For example,a left-skewed (i.e., negatively skewed) distribution has a long lefttail and a right-skewed (i.e., positively skewed) distribution has along right tail. In some embodiments, upon determining that the trainingset contains a skewed sample, the order processing device 114 canprevent skewed training data from being fed into the artificial neuralnetwork model. For example, if Category A of the training data includes9000 training data points and Category B of the training data containsonly 1000 training data points, then the artificial neural network modelwill be biased toward Category A. If this skewed training data were fedinto the artificial neural network model, then the model would ignoreCategory B and instead predict the output as Category A, thus gainingpseudo-accuracy while losing precision. The order processing device 114can prevent the skewed training data from being fed into the artificialneural network by, for example, weighting the skewed samples of thetraining data as described below.

In step 604, the order processing device 114 can calculate label weightscorresponding to a distribution of Y-values in a training set. In anembodiment, the order processing device 114 can calculate the labelweights for a category by dividing the total number of samples by thetotal number of samples in a category (i.e., weight for a category=totalnumber of samples/total number of samples in the category). In anembodiment, the samples are derived from prior prescriptions and includethe data coming in from prescribers (e.g., doctors, etc.) and the dataapproved by the pharmacist (or pharmacist technician). As the number ofsamples increases the label weight will decrease, and as the number ofsamples in a category decreases the label weight will increase. Forexample, a frequency distribution may be as follows: Type 0—10000, Type1—3000, Type 2—500, Type 3—900. The label weight of Type 0 can be set to1 (e.g., the maximum frequency of Type 0 with a frequency of 10000). Thesubsequent label weights for each type can be calculated by dividing themaximum frequency with the frequency of the type (i.e., label weight ofType N=max frequency/frequency of Type N). Accordingly, in this examplethe label weight of Type 1 is 3.33 (i.e., 10000/3000), the label weightof Type 2 is 20 (i.e., 10000/500), and the label weight of Type 3 is11.11 (i.e., 10000/900). Accordingly, the final list of label weights tobe applied to the skewed training data samples of this exampleembodiment will be [1, 3.33, 20, 11.11]. As will be understood by thoseof ordinary skill in the art, the label weights applied to skewedtraining data samples are different from the input value weightsassociated with the artificial neural network further described herein.The label weights are calculated by the order processing device 114while training the artificial neural network model and label weights arecalculated for each set of training data used for training theartificial neural network model.

In step 606, the order processing device 114 can use the label weightswhile creating and fitting the model.

FIG. 7 illustrates an artificial neural network 700 for predictingprescription drug directions from required pharmacy element values anddirections in a prescription, according to an example embodiment. In anembodiment, required pharmacy element values and directions in aprescription, represented as X values in FIG. 7, are each inputted tothe artificial neural network 700. For example, inputted requiredpharmacy elements may include days' supply (X₁), drug code (e.g.,National Drug Code (NDC), etc.) (X₂), and quantity (X₃). Additionalexemplary required pharmacy elements include, but are not limited to, anumber of refills authorized by a doctor who prescribed theprescription, a price of the prescription, and a co-pay amount for theprescription. Each word of the prescription directions, up to the n-thword (X_(n)), may also be inputted to the artificial neural network 700.The inputted pharmacy element values and directions may each be weightedwith a value (e.g., W₁, W₂, W₃, W_(n), etc.) as further describedherein. The artificial neural network 700 can predict and output theprescription drug directions by performing an activation function on theweighted input values. For example, the activation function illustratedin FIG. 7 is

${f\left( {\sum\limits_{i = 1}^{n}{W_{i}X_{i}}} \right)}.$

For example, the days' supply input (X₁) may have a value of 28, thedrug code input (X₂) may have a value of 00074433902, the quantity input(X₃) may have a value of 2, the direction first word input (X₄) may havea value of “take”, the direction second word input (X₅) may have a valueof “one”, the direction third word input (X₆) may have a value of“every”, the direction fourth word input (X₇) may have a value of “two”,and the direction fifth word input (X₈) may have a value of “weeks”. Byperforming the activation function illustrated in FIG. 7 on theseinputs, the artificial neural network 700 can predict four types ofprescription drug directions: “Type 0=INJECT 40 MG UNDER THE SKIN EVERYOTHER WEEK”, “Type 1=INJECT 40 MG UNDER THE SKIN EVERY WEEK (MAINTENANCEDOES)”, “Type 2=INJECT 40 MG UNDER THE SKIN EVERY OTHER WEEK ASDIRECTED”, and “Type 3=INJECT 40 MG UNDER THE SKIN EVERY WEEK”. FIG. 8illustrates the confidence level of the four predicted types. In thisexample embodiment, artificial neural network 700 is most confident inType 0 and thus outputs “INJECT 40 MG UNDER THE SKIN EVERY OTHER WEEK”as the predicted prescription drug direction. In other words, Type 0 hasthe highest confidence value of the four types and thus artificialneural network 700 selects Type 0 because it has the highest confidencevalue in this example embodiment.

In another example, the artificial neural network 700 may continuallylearn which particular input values are associated with particulardirections. For example, the drug code input (X₂) may have a value thatis indicative of a drug that is in the form of an orally administeredpill. The artificial neural network 700 can understand that when thedrug code input (X₂) has that value indicative of a drug that is in theform of an orally administered pill then the chances of the drugdirections including the word “inject” are low (e.g., near 0%) but thechances of the drug directions including the word “orally” are high(e.g., near 100%). In this example embodiment, the artificial neuralnetwork 700 may assign a large weight value (W₂) to the drug code input(X₂) because the drug code value has a high correlation to the drugdirection confidence level. But the artificial neural network 700 may becapable of continually learning which input values have highcorrelations to the drug direction confidence level and re-assigning theweight values accordingly. For instance, the artificial neural network700 may learn that a different input value, or certain combination ofinput values, has a higher correlation to the drug direction confidencelevel than the drug code input (X₂) alone. In such an instance, theartificial neural network 700 may update the weighting values toimplement the updated information about the correlation between theinput values and the drug direction confidence level.

The foregoing description is merely illustrative in nature and is in noway intended to limit the disclosure, its application, or uses. Thebroad teachings of the disclosure can be implemented in a variety offorms. Therefore, while this disclosure includes particular examples,the true scope of the disclosure should not be so limited since othermodifications will become apparent upon a study of the drawings, thespecification, and the following claims. It should be understood thatone or more steps within a method may be executed in different order (orconcurrently) without altering the principles of the present disclosure.Further, although each of the embodiments is described above as havingcertain features, any one or more of those features described withrespect to any embodiment of the disclosure can be implemented in and/orcombined with features of any of the other embodiments, even if thatcombination is not explicitly described. In other words, the describedembodiments are not mutually exclusive, and permutations of one or moreembodiments with one another remain within the scope of this disclosure.

Spatial and functional relationships between elements (for example,between modules) are described using various terms, including“connected,” “engaged,” “interfaced,” and “coupled.” Unless explicitlydescribed as being “direct,” when a relationship between first andsecond elements is described in the above disclosure, that relationshipencompasses a direct relationship where no other intervening elementsare present between the first and second elements, and also an indirectrelationship where one or more intervening elements are present (eitherspatially or functionally) between the first and second elements. Asused herein, the phrase at least one of A, B, and C should be construedto mean a logical (A OR B OR C), using a non-exclusive logical OR, andshould not be construed to mean “at least one of A, at least one of B,and at least one of C.”

In the figures, the direction of an arrow, as indicated by thearrowhead, generally demonstrates the flow of information (such as dataor instructions) that is of interest to the illustration. For example,when element A and element B exchange a variety of information butinformation transmitted from element A to element B is relevant to theillustration, the arrow may point from element A to element B. Thisunidirectional arrow does not imply that no other information istransmitted from element B to element A. Further, for information sentfrom element A to element B, element B may send requests for, or receiptacknowledgements of, the information to element A. The term subset doesnot necessarily require a proper subset. In other words, a first subsetof a first set may be coextensive with (equal to) the first set.

In this application, including the definitions below, the term “module”or the term “controller” may be replaced with the term “circuit.” Theterm “module” may refer to, be part of, or include processor hardware(shared, dedicated, or group) that executes code and memory hardware(shared, dedicated, or group) that stores code executed by the processorhardware.

The module may include one or more interface circuits. In some examples,the interface circuit(s) may implement wired or wireless interfaces thatconnect to a local area network (LAN) or a wireless personal areanetwork (WPAN). Examples of a LAN are Institute of Electrical andElectronics Engineers (IEEE) Standard 802.11-2016 (also known as theWIFI wireless networking standard) and IEEE Standard 802.3-2015 (alsoknown as the ETHERNET wired networking standard). Examples of a WPAN arethe BLUETOOTH wireless networking standard from the Bluetooth SpecialInterest Group and IEEE Standard 802.15.4.

The module may communicate with other modules using the interfacecircuit(s). Although the module may be depicted in the presentdisclosure as logically communicating directly with other modules, invarious implementations the module may actually communicate via acommunications system. The communications system includes physicaland/or virtual networking equipment such as hubs, switches, routers, andgateways. In some implementations, the communications system connects toor traverses a wide area network (WAN) such as the Internet. Forexample, the communications system may include multiple LANs connectedto each other over the Internet or point-to-point leased lines usingtechnologies including Multiprotocol Label Switching (MPLS) and virtualprivate networks (VPNs).

In various implementations, the functionality of the module may bedistributed among multiple modules that are connected via thecommunications system. For example, multiple modules may implement thesame functionality distributed by a load balancing system. In a furtherexample, the functionality of the module may be split between a server(also known as remote, or cloud) module and a client (or, user) module.

The term code, as used above, may include software, firmware, and/ormicrocode, and may refer to programs, routines, functions, classes, datastructures, and/or objects. Shared processor hardware encompasses asingle microprocessor that executes some or all code from multiplemodules. Group processor hardware encompasses a microprocessor that, incombination with additional microprocessors, executes some or all codefrom one or more modules. References to multiple microprocessorsencompass multiple microprocessors on discrete dies, multiplemicroprocessors on a single die, multiple cores of a singlemicroprocessor, multiple threads of a single microprocessor, or acombination of the above.

Shared memory hardware encompasses a single memory device that storessome or all code from multiple modules. Group memory hardwareencompasses a memory device that, in combination with other memorydevices, stores some or all code from one or more modules.

The term memory hardware is a subset of the term computer-readablemedium. The term computer-readable medium, as used herein, does notencompass transitory electrical or electromagnetic signals propagatingthrough a medium (such as on a carrier wave); the term computer-readablemedium is therefore considered tangible and non-transitory. Non-limitingexamples of a non-transitory computer-readable medium are nonvolatilememory devices (such as a flash memory device, an erasable programmableread-only memory device, or a mask read-only memory device), volatilememory devices (such as a static random access memory device or adynamic random access memory device), magnetic storage media (such as ananalog or digital magnetic tape or a hard disk drive), and opticalstorage media (such as a CD, a DVD, or a Blu-ray Disc).

The apparatuses and methods described in this application may bepartially or fully implemented by a special purpose computer created byconfiguring a general purpose computer to execute one or more particularfunctions embodied in computer programs. The functional blocks andflowchart elements described above serve as software specifications,which can be translated into the computer programs by the routine workof a skilled technician or programmer.

The computer programs include processor-executable instructions that arestored on at least one non-transitory computer-readable medium. Thecomputer programs may also include or rely on stored data. The computerprograms may encompass a basic input/output system (BIOS) that interactswith hardware of the special purpose computer, device drivers thatinteract with particular devices of the special purpose computer, one ormore operating systems, user applications, background services,background applications, etc.

The computer programs may include: (i) descriptive text to be parsed,such as HTML (hypertext markup language), XML (extensible markuplanguage), or JSON (JavaScript Object Notation), (ii) assembly code,(iii) object code generated from source code by a compiler, (iv) sourcecode for execution by an interpreter, (v) source code for compilationand execution by a just-in-time compiler, etc. As examples only, sourcecode may be written using syntax from languages including C, C++, C#,Objective-C, Swift, Haskell, Go, SQL, R, Lisp, Java®, Fortran, Perl,Pascal, Curl, OCaml, Javascript®, HTML5 (Hypertext Markup Language 5threvision), Ada, ASP (Active Server Pages), PHP (PHP: HypertextPreprocessor), Scala, Eiffel, Smalltalk, Erlang, Ruby, Flash®, VisualBasic®, Lua, MATLAB, SIMULINK, and Python®.

Example methods and systems for using machine learning algorithms aredescribed. In the following description, for purposes of explanation,numerous specific details are set forth in order to provide a thoroughunderstanding of example embodiments. It will be evident, however, toone of ordinary skill in the art that embodiments of the presentdisclosure may be practiced without these specific details.

The invention claimed is:
 1. A method comprising: a drug directionprediction subsystem receiving and pre-processing values of a pluralityof required pharmacy elements for a corresponding prescription of aplurality of prescriptions; the drug direction prediction subsystemgenerating respective weights for the values of the plurality ofrequired pharmacy elements of the prescription based on one or more ofthe values of the plurality required pharmacy elements of theprescription; the drug direction prediction subsystem creating a machinelearning model to be used by one of a plurality of machine learningalgorithms in predicting drug directions of the prescription, themachine learning model using the values of the plurality of requiredpharmacy elements of the prescription and the respective weights; andthe drug direction prediction subsystem predicting a plurality of drugdirections of a new prescription by executing the one of the pluralityof machine learning algorithms and the machine learning model usingweighted values of the plurality of required pharmacy elements of theprescription.
 2. The method of claim 1 wherein the plurality of machinelearning algorithms are neural network machine learning algorithms. 3.The method of claim 1 further comprising: displaying the plurality ofpredicted drug directions of the new prescription; receiving a userselection of one of the plurality of displayed predicted drugdirections; and populating a form with the selected predicted drugdirection.
 4. The method of claim 1 further comprising: the drugdirection prediction subsystem determining a confidence value for theplurality of predicted drug directions of the prescription; the drugdirection prediction subsystem selecting a first of the plurality ofpredicted drug directions having a highest confidence value; and thedrug direction prediction subsystem pre-populating a form with theselected predicted drug direction.
 5. The method of claim 1, wherein thepre-processing of the values of the plurality of required pharmacyelements of the prescription comprises: cleaning the values of theplurality of required pharmacy elements of the prescription; splitting apredetermined number of words of directions of the plurality of requiredpharmacy elements of the prescription; transforming the words tonumbers; and identifying and creating a listing of numeric features inthe numbers.
 6. The method of claim 5, wherein said cleaning the valuesof the plurality of required pharmacy elements of the prescriptioncomprises cleaning the values using k-means clustering and a customdictionary.
 7. The method of claim 5, wherein said transforming thewords to numbers comprises: creating a dictionary of the words and afrequency of the words in one position; and assigning numbers to theorder of the frequency of the words.
 8. The method of claim 5, whereinsaid identifying and creating the listing of numeric features in thenumbers comprises: determining a training data set contains a skewedsample by a distribution of Y-values in the training data set, whereinthe training data set includes the values of the plurality of requiredpharmacy elements of the prescription; calculating a plurality of labelweights corresponding to the distribution of the Y-values in thetraining data set; and using the calculated label weights while creatingthe machine learning model.
 9. The method of claim 1 wherein therequired pharmacy elements comprise one or more of a drug quantity, anumber of days in a supply of the prescription, a number of refillsauthorized by a doctor who prescribed the prescription, instructions ontaking the prescription, a price of the prescription, or a co-pay amountfor the prescription.
 10. The method of claim 1 further comprisingreceiving the prescription via a facsimile communication.
 11. A systemfor automatically processing prescriptions, comprising: a storage deviceto store a plurality of machine learning algorithms; and a subsystem incommunication with the storage device and operable to: receive andpre-process values of a plurality of required pharmacy elements of aprescription, said pre-processing the values of the plurality ofrequired pharmacy elements of the prescription including weighting thevalues; create a machine learning model to be used by the plurality ofmachine learning algorithms in predicting drug directions of theprescription; and predict a plurality of drug directions of theprescription by executing the machine learning algorithms and themachine learning model on the weighted values of the plurality ofrequired pharmacy elements of the prescription.
 12. The system of claim11 wherein the plurality of machine learning algorithms are neuralnetwork machine learning algorithms.
 13. The system of claim 11 whereinthe subsystem is further operable to: display the plurality of predicteddrug directions of the prescription; receive a user selection of one ofthe plurality of displayed predicted drug directions; and populate aform with the selected predicted drug direction.
 14. The system of claim11 wherein the subsystem is further operable to: determine a confidencevalue for the plurality of predicted drug directions of theprescription; select a first of the plurality of predicted drugdirections having a highest confidence value; and pre-populate a formwith the selected predicted drug direction.
 15. The system of claim 11,wherein the subsystem is further operable to: clean the values of theplurality of required pharmacy elements of the prescription; split apredetermined number of words of directions of the plurality of requiredpharmacy elements of the prescription; transform the words to numbers;and identify and create a listing of numeric features in the numbers.16. The system of claim 15, wherein the subsystem is further operable toclean the values of the plurality of required pharmacy elements of theprescription by cleaning the values using k-means clustering and acustom dictionary.
 17. The system of claim 15, wherein the subsystem isfurther operable to transform the words to numbers by: creating adictionary of the words and a frequency of the words in one position;and assigning numbers to the order of the frequency of the words. 18.The system of claim 15, wherein the subsystem is further operable toidentify and create the listing of numeric features in the numbers by:determining a training data set contains a skewed sample by adistribution of Y-values in the training data set, wherein the trainingdata set includes the values of the plurality of required pharmacyelements of the prescription; calculating a plurality of label weightscorresponding to the distribution of the Y-values in the training dataset; and using the calculated label weights while creating the machinelearning model.
 19. The system of claim 11 wherein the required pharmacyelements comprise one or more of a drug quantity, a number of days in asupply of the prescription, a number of refills authorized by a doctorwho prescribed the prescription, instructions on taking theprescription, a price of the prescription, or a co-pay amount for theprescription.
 20. The system of claim 11 further comprising receivingthe prescription via a facsimile communication.
 21. A non-transitorymachine-readable medium comprising instructions, which, when executed byone or more processors, cause the one or more processors to perform thefollowing operations: receive and pre-process values of a plurality ofrequired pharmacy elements of a prescription, said pre-processing thevalues of the plurality of required pharmacy elements of theprescription including weighting the values; create a machine learningmodel to be used by the plurality of machine learning algorithms inpredicting drug directions of the prescription; and predict a pluralityof drug directions of the prescription by executing the machine learningalgorithms and the machine learning model on the weighted values of theplurality of required pharmacy elements of the prescription.